<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Welcome to profile page</title>
    </head>
    <?php
    if ($this->session->userdata('id')) {
        ?>
        <body>

            <div class="prod_box_big">
                <div class="center_prod_box_big">
                    <div class="contact_form">
                        <?php
                        echo '<span style="color:red;">' . validation_errors() . '</span>';
                        ?>
                        <?php
                        if ($user->num_rows() > 0) {
                            foreach ($user->result() as $row) {
                                ?>
                                <div class="form_row">
                                    <label class="contactform"><strong>Username:</strong></label>
                                    <?php echo $row->user_name; ?>
                                </div>
                                <div class="form_row">
                                    <label class="contactform"><strong>E_mail:</strong></label>
                                    <?php echo $row->e_mail; ?>
                                </div>
                                <div class="form_row">
                                    <label class="contactform"><strong>Phones:</strong></label>
                                    <?php echo $row->phone; ?>
                                </div>
                                <div class="form_row">
                                    <label class="contactform"><strong>Gender:</strong></label>
                                    <?php echo $row->gender; ?>
                                </div>
                                <div class="form_row">
                                    <label class="contactform"><strong>Address:</strong></label>
                                    <?php echo $row->address; ?>
                                </div>
                        <p>&nbsp;</p>
                                <div class="form_row_img">
                                    <?php
                                    echo anchor('pages/update_profile', ' Update');
                                }
                            }
                            ?>
                        </div>
                    </div>
                </div>
            </div>
            <?php
        } else {
            redirect(base_url());
        }
        ?>
    </body>
</html>